﻿using System;
using System.Collections.Generic;
using System.Text;

using Walkmen.OpenMG;
using Walkmen.ID3v2;

namespace Walkmen.Convert
{
    public class ConvertContext
    {
        private readonly ID3v2Encoding _encoding;
        private readonly ID3v2Header _header;

        public ID3v2Header Header
        {
            get
            {
                return _header;
            }
        }

        public ID3v2Encoding Encoding
        {
            get
            {
                return _encoding;
            }
        }

        public ConvertContext(ID3v2Header header, string encoding)
        {
            _header = header;
            switch (encoding)
            {
                case "ISO-8859-1":
                    _encoding = ID3v2Encoding.ISO88591;
                    break;
                case "Unicode":
                    _encoding = ID3v2Encoding.Unicode;
                    break;
                default:
                    throw new NotSupportedException(encoding);
            }
        }
    }
}
